package phoneData

import java.io.{DataInput, DataOutput}

import org.apache.hadoop.io.Writable

case class FlowBean(var upFlow: Long, var downFlow: Long, var sumFlow: Long) extends Writable {

  def this() = this(0, 0, 0)

  override def write(dataOutput: DataOutput): Unit = {
    dataOutput.writeLong(upFlow)
    dataOutput.writeLong(downFlow)
    dataOutput.writeLong(sumFlow)
  }

  override def readFields(dataInput: DataInput): Unit = {
    upFlow = dataInput.readLong()
    downFlow = dataInput.readLong()
    sumFlow = dataInput.readLong()
  }

  override def toString: String = {
    upFlow + "\t" + downFlow + "\t" + sumFlow
  }
}
